package dj.framework.repository;


import dj.framework.domain.SysLog;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface LogRepository extends JpaRepository<SysLog,Long>, JpaSpecificationExecutor<SysLog> {

    /**
     * 根据日志类型删除信息
     */
    @Modifying
    @Query(value = "delete from Sys_log where log_type=?1",nativeQuery = true)
    void deleteByLogType(String logType);
}
